$INCLUDE: 'C:\FG\FASTGRAF.FI'

C----------------------------------------------------------------------
C  NOTE!!!
C  When run in real mode, this program requires the large memory model.
C----------------------------------------------------------------------

      PROGRAM MAIN

      INTEGER*1 ARROW(35), ARROW256(70), BUFFER(70)
      INTEGER HANDLE, STATUS
      INTEGER OLD_MODE
      INTEGER FG_GETMODE, FG_TESTMODE, FG_VBDEFINE, FG_VBOPEN
      
      DATA ARROW /
     +   #00,#00,#00,#F0,#00,
     +   #00,#00,#00,#FF,#00,
     +   #FF,#FF,#FF,#FF,#F0,
     +   #FF,#FF,#FF,#FF,#FF,
     +   #FF,#FF,#FF,#FF,#F0,
     +   #00,#00,#00,#FF,#00,
     +   #00,#00,#00,#F0,#00/

      CALL FG_INITPM
      IF (FG_TESTMODE(13,1) .EQ. 0) THEN
         STOP 'This program requires a 320 x 200 EGA graphics mode.'
      END IF

      OLD_MODE = FG_GETMODE()
      CALL FG_SETMODE(13)
      CALL FG_UNPACK(ARROW,ARROW256,35)

      CALL FG_VBINIT
      HANDLE = FG_VBDEFINE(BUFFER,10,7)
      STATUS = FG_VBOPEN(HANDLE)
      CALL FG_SETCOLOR(9)
      CALL FG_FILLPAGE
      CALL FG_MOVE(0,6)
      CALL FG_DRWIMAGE(ARROW256,10,7)

      CALL FG_VBPASTE(0,9,0,6,156,101)
      CALL FG_WAITKEY

      CALL FG_VBCLOSE
      CALL FG_SETMODE(OLD_MODE)
      CALL FG_RESET
 
      STOP ' '
      END
